<template>
  <PageList :type="RouteType.sale" curPageName="consumerGoods" />
</template>

<script setup lang="ts" name="consumerGoods">
import { reactive, onMounted, provide } from "vue";

import { ResultEnum } from "@/enums/httpEnum";
import { UserAuthType, getUserAuth } from "@/api/modules/user";
import { RouteType } from "@/api/modules/goodsArchive/list/information";
import PageList from "./components/PageList.vue";

const auth = reactive<UserAuthType>({});

onMounted(() => {
  getUserAuth("consumerGoods").then(({ code, data }) => {
    if (code == ResultEnum.SUCCESS) {
      Object.assign(auth, data);
    }
  });
});

provide("auth", auth);
</script>
